
<script>
import subTest from './subText'
export default {
    name:'test',
    data () {
        return {
            msg:"This is test",
            actTest:true,
            toSub:'trans from father',
            scopeTest:'this is slot-scope testss'
        }
    },
    methods:{
        hanleSubClick () {
            alert('click sub');
            this.$emit('onClick')
        },
        handleC () {
            alert('div dom');
        }
    },
    render (h) {
        const otherDom =  [
            this.$scopedSlots.default(this.scopeTest),
            h('div',{
                domProps:{
                    innerHTML:'testtttttttttttttttttttttt'
                },
                on:{
                    click:this.handleC
                }
            })
        ]
        return h(subTest,
         {
            props:{
                fatherInfo:this.scopeTest
            },
            scopedSlots:{
                default : function ({pro}) {
                    return  [h(subTest,{
                                props:{
                                    fatherInfo:pro
                                }
                            })].concat(otherDom);
                }
            }
        }
       )
    }    
}
</script>
<style lang="less" scoped>
    .test{
        color:blue;
        &.act{
            color:red;
        }
    }
</style>